<?php
/*
使用formdata简化提交表单操作
 */


$origin = isset($_SERVER['HTTP_ORIGIN'])? $_SERVER['HTTP_ORIGIN'] : '';//获取客户端请求头参数Origin
header('Access-Control-Allow-Origin:'.$origin);

$arr = array(
    "user" => $_POST['username'],
    "pass" => $_POST['password'],
);


echo json_encode($arr);
?>
